package com.example.myapptwo.views;

import android.annotation.SuppressLint;
import android.content.Intent;
import android.view.View;

import com.example.myapptwo.R;
import com.example.myapptwo.base.BaseFragment;
import com.example.myapptwo.widget.HeaderView;

public class CoursesFragment extends BaseFragment {

   private HeaderView mHeaderView;
   @Override
   protected int getLayoutId() {
      return R.layout.fragment_courses;
   }

   @SuppressLint("WrongViewCast")
   @Override
   protected void initView() {
      mHeaderView = mView.findViewById(R.id.header_view);
      mHeaderView.setTitle("我的课程");
   }

   @Override
   protected void initListener() {

   }
   @Override
   public void onClick(View v) {
      int id = v.getId();
      if (id == R.id.button_right) {
         Intent intent = new Intent(mContext, AddCourseActivity.class);
         startActivity(intent);
      }
   }
}
